import request from '@/utils/request'

export function purchaseTicket(data) {
  return request({
    url: '/api/user/initOrder',
    method: 'post',
    data
  })
}

export function payTicket(data) {
 return request({
    url: '/api/user/pay',
    method: 'post',
    data
})
}

export function queryOrder(data) {
    return request({
      url: '/api/user/queryOrder',
      method: 'post',
      data
    })
}

export function queryAllOrder(){
  return request({
    url: '/api/user/queryOrder',
    method: 'get',
  })
}

export function deleteOrder(data) {
    return request({
      url: '/api/user/deleteOrder',
      method: 'post',
      data
    })
}

export function refundTicket(data) {
    return request({
      url: '/api/user/refund',
      method: 'post',
      data
    })
}

export function aliPay(data) {
  return request({
    url: '/alipay',
    method: 'post',
    data
  })
}

export function rebook1(data){
  return request({
    url: '/api/user/rebook_first',
    method:'post',
    data
  })
}

export function rebook2(data){
  return request({
    url: '/api/user/rebookSecond',
    method:'post',
    data
  })
}
export function rebookpay(data){
  return request({
    url: '/api/user/pay2',
    method:'post',
    data
  })
}
export function rebook(data){
  return request({
    url: '/api/user/rebook',
    method:'post',
    data
  })
}

export function queryStatus(data){
  return request({
    url: 'api/user/queryOrderStatus',
    method:'post',
    data
  })
}


